function fh() {
    location.href = "../../li_meng/mdesignprocedureUP(1).html";
}

$(function () {
    WuLiao();
})

function WuLiao() {
    let mDesignProcedureDetails=JSON.parse(localStorage.getItem("mdesignprocedureUP(1)"));
    $.ajax({
        type: "post",
        url: "/Mdesignproceduremoduledetails.do/limengUpDateChamDesignProcedureModuleDetails",
        data: {id: mDesignProcedureDetails.id},
        success: function (data) {
            let tr = "<tr>\n" +
                "      <th>序号</th>\n" +
                "      <th>物料名称</th>\n" +
                "      <th>物料编号</th>\n" +
                "      <th>描述</th>\n" +
                "      <th>设计数量</th>\n" +
                "      <th>单位</th>\n" +
                "      <th>单价(元)</th>\n" +
                "      <th>本工序数量</th>\n" +
                "      </tr>";
            let tr1 = ""
            $.each(data, function (index, item) {
                tr1 += "<tr>\n" +
                    "       <td>" + item.id + "</td>\n" +
                    "       <td>" + item.productname + "</td>\n" +
                    "       <td>" + item.productid + "</td>\n" +
                    "       <td>" + item.productdescribe + "</td>\n" +
                    "       <td>" + item.amount + "</td>\n" +
                    "       <td>" + item.amountunit + "</td>\n" +
                    "       <td>" + item.costprice + "</td>\n" +
                    "       <td><input class='ShuLiang' type='number' value='0' /></td>\n" +
                    "       </tr>"
            })
            let table = tr + tr1;
            $("#tableAdd").html(table)
        }
    })
}

function yl() {
    let shu =[];
    $(".ShuLiang").each(function () {
        shu.push(parseInt($(this).val()));
    })
    localStorage.setItem("shuliangList",JSON.stringify(shu));
    location.href="../../li_meng/mdesignprocedureUP(1)(02).html";
}
